let authorSuccess =false;

Page({

  data: {

  },

  onLoad: function (options) {

  },
  getUserInfo(e){
    if(e.detail.errMsg.indexOf("ok")>0){
      this.authorSuccess=true;
      const eventChannel = this.getOpenerEventChannel()
      eventChannel.emit('onUserAuthorSuccess', {});
      wx.navigateBack({
        delta: 1
      })
    }else{
    }

  },
  onUnload: function () {
      if(!this.authorSuccess){
        const eventChannel = this.getOpenerEventChannel()
    eventChannel.emit('onUserAuthorSuccess', {});
  }
  },

})